From ce4cdc3469c2ab228f311e0b77b226b8e8e7ebeb Mon Sep 17 00:00:00 2001 From: Domas Mituzas Date: Thu, 30 Sep 2004 14:40:06 +0000 Subject: [PATCH] pass unescaped query string to Database::insert(), double escaping is not needed --- includes/Profiling.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/Profiling.php b/includes/Profiling.php index 48129ec038..cf0cc4201d 100755 --- a/includes/Profiling.php +++ b/includes/Profiling.php @@ -179,11 +179,12 @@ class Profiler $dbw =& wfGetDB( DB_MASTER ); $profiling = $dbw->tableName( 'profiling' ); - $name = substr($dbw->strencode( $name ),0,255); + $name = substr($name,0,255); + $encname = $dbw->strencode($name); $sql = "UPDATE $profiling ". "SET pf_count=pf_count+{$eventCount}, ". "pf_time=pf_time + {$timeSum} ". - "WHERE pf_name='{$name}'"; + "WHERE pf_name='{$encname}'"; $dbw->query($sql); $rc = $dbw->affectedRows(); -- 2.20.1